package cn.com.blueInfo.HaiYuan.business.payment.controller;

import cn.com.blueInfo.HaiYuan.business.payment.service.PaymentVoucherService;
import cn.com.blueInfo.utils.result.BootstrapTable;
import cn.com.blueInfo.utils.result.ResultInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 付款单据管理
 * @ClassName: PaymentVoucherController
 * @author suxch
 * @date 2019年8月23日  上午10:50:15
 */
@RestController
@RequestMapping("/operation/business/paymentVoucher")
public class PaymentVoucherController {

    @Autowired
    private PaymentVoucherService paymentVoucherService;

    /**
     * 分页查询付款单信息
     * @Title: queryPaymentVoucherInfoByPage
     * @param request
     * @return BootstrapTable
     * @throws
     */
    @RequestMapping("/queryPaymentVoucherInfoByPage.do")
    public BootstrapTable queryPaymentVoucherInfoByPage(HttpServletRequest request) {
        return paymentVoucherService.queryPaymentVoucherDataByPage(request);
    }

    /**
     * 新增付款单信息
     * @Title: addPaymentVoucherInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/addPaymentVoucherInfo.do")
    public ResultInfo addPaymentVoucherInfo(HttpServletRequest request) {
        return paymentVoucherService.addPaymentVoucherData(request);
    }

    /**
     * 创建付款单信息
     * @Title: createPaymentVoucherInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/createPaymentVoucherInfo.do")
    public ResultInfo createPaymentVoucherInfo(HttpServletRequest request) {
        return paymentVoucherService.createPaymentVoucherData(request);
    }

    /**
     * 更新付款单信息
     * @Title: updatePaymentVoucherInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/updatePaymentVoucherInfo.do")
    public ResultInfo updatePaymentVoucherInfo(HttpServletRequest request) {
        return paymentVoucherService.updatePaymentVoucherData(request);
    }

    /**
     * 删除付款单信息
     * @Title: deletePaymentVoucherInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/deletePaymentVoucherInfo.do")
    public ResultInfo deletePaymentVoucherInfo(HttpServletRequest request) {
        return paymentVoucherService.deletePaymentVoucherData(request);
    }

}
